﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Jinjia.Approve.Model.VM.JJFlow;

namespace Jinjia.Approve.IService.JJFlow
{
    public interface IJJFlowNodeService
    {
        Task<List<Node>> GetNodes(int template_id);

        Task<List<Node>> GetNodesPlan(int flow_instance_id);

        Task<Node> GetStartNode(int template_id);
        
        Task<Node> GetPrevNode(int instance_id, int node_id);

        Task<Node> GetNextNode(int instance_id, int node_id);

        Task<Node> GetNodeById(int node_id);

        Task<List<Node>> GetNodeByIds(List<int> nodeIds);

        /// <summary>
        /// 确定path
        /// </summary>
        /// <param name="biz_order_id"></param>
        /// <param name="start_node"></param>
        /// <param name="user_id"></param>
        /// <param name="instance_id"></param>
        /// <returns></returns>
        Task<List<Node>> DecidePath(string biz_order_id, Node start_node, string user_id, int instance_id);

        Task<List<Node>> GetNodeByInstanceIds(List<int> instanceIds);


        /// <summary>
        /// 解析条件表达式返回结果new
        /// </summary>
        /// <param name="instance_id"></param>
        /// <param name="ori_condition_str"></param>
        /// <returns></returns>
        Task<bool> CheckConditionNew(int instance_id, string ori_condition_str);
    }
}